<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
<script>
function syncLoad(url, onload) {
    var script = document.createElement("script");
    script.async = false;
    script.onload = onload;
    script.src = url;
    document.head.appendChild(script);
}
</script>
</head>
<body>
<script>
description("Sync scripts that fail to load should not block later sync scripts from executing.");

window.jsTestIsAsync = true;

if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

function nonExistentJS() {
    return "http://localhost/non-existing-" + Math.random() + ".js";
}

for (var i = 0; i < 10; ++i)
    syncLoad(nonExistentJS());

syncLoad("resources/success.js", finishJSTest);
</script>
</body>
</html>
